import { PROJECT_PREFIX } from '../../types/constants'

export function styles(className: string): string {
  return `
    .${className} {
      width: 100%;
      margin: 20px 0;
      
      .table-title {
        margin: 0 0 15px 0;
        font-size: 18px;
        color: #333;
      }
      
      .table-data-count {
        margin: 8px 0;
        font-size: 12px !important;
        color: #666 !important;
        text-align: right;
      }
      
      .table-controls {
        display: flex;
        flex-direction: row;
        gap: 10px;
        margin-bottom: 10px;
        align-items: center;
        
        .search-container {
          width: 50%;
          min-width: 200px;
        }
        
        .select-container {
          margin-left: auto;
        }
      }
      
      .table-responsive {
        overflow-x: auto;
      }
      
      .table-data {
        width: 100%;
        border-collapse: collapse;
        
        tbody {
          .table-highlight {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: fit-content;
            background-color: var(--${PROJECT_PREFIX}-theme-table-highlight-bg) !important;
            color: #ffffff !important;
            padding: 0 4px;
            border-radius: 2px;
            font-weight: bold;
          }
        }
        
        th, td {
          padding: 12px 15px;
          text-align: left;
          border-bottom: 1px solid #ddd;
        }
        
        th {
          background-color: #f8f9fa;
          font-weight: 600;
          position: sticky;
          top: 0;
        }
        
        tr:hover {
          background-color: #f5f5f5;
        }
      }
    }
  `
}
